home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Tools 5
/
Amiga Tools 5.iso
/
tools
/
patches
/
patch2amitcp_4.3
/
bin
/
patcher!
< prev
next >
Wrap
AmigaDOS Script File
|
1996-04-07
|
1KB
|
68 lines
.KEY RXCMD/A,tdir/A,SFILE/A,PFILE/A
.BRA {
.KET }
If Exists ENV:installer-result
Delete ENV:installer-result Quiet Force
EndIf
set sum=`bin/tmd5sum "{SFILE}"`
FailAt 11
{RXCMD} bin/patchfiles $sum patch/{PFILE} >"ENV:installer-result"
If ERROR
unset sum
Quit 10
endif
unset sum
set patches=`Type ENV:installer-result`
;Echo RXOUT $patches
if "$patches" EQ "NOMATCH"
; Echo "Patch files not found !!!!" >"ENV:installer-result"
unset patches
Quit 11
endif
if "$patches" EQ "PATCHED"
; Echo {SFILE} "Already patched" >"ENV:installer-result"
unset patches
Quit 5
endif
If Exists {tdir}NSDi_patched
Delete {tdir}NSDi_patched Quiet Force
endif
Copy "{SFILE}" {tdir}NSDi_patched
Lab Loop
set patchfile=`{RXCMD} "Say DelWord('$patches', 2)"`
;Echo PATCHFILE $patchfile
set patches="`{RXCMD} "Say DelWord('$patches', 1, 1)"`"
;Echo PATCHES $patches
If "$patches" EQ ""
; set sum=`bin/tmd5sum {tdir}NSDi_patched`
; If $sum NOT EQ $patchfile
; Echo "Incorrect result file" >"ENV:installer-result"
; unset patches
; unset patchfiles
; Quit 5
; EndIf
Skip loppu
EndIf
bin/spatch -o{tdir}NSDi_patching -ppatch/$patchfile {tdir}NSDi_patched
Delete {tdir}NSDi_patched force quiet
Rename {tdir}NSDi_patching {tdir}NSDi_patched
Skip BACK loop
Lab loppu
unset patches
unset patchfile